package com.intelligentcar.springboot.mapper;

import com.intelligentcar.springboot.bean.Advertisement;
import com.intelligentcar.springboot.bean.Partner;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AdvertisementMapper {

    //    条件查询
    List<Advertisement> Lookpname(Advertisement advertisement);

    List<Advertisement> LookaddTime(@Param(value = "addTime")String addTime);

    //展示所有广告商
    List<Advertisement> LookAdvertisement();

    //下拉框获取所有广告商
    List<Partner> LookAdvertisement11();

    //查询总条数
    int selectAdvertisement();

    //修改广告信息
    int updateAdvertisement(@Param(value = "adid")long adid,
                            @Param(value = "advertPicutre")String advertPicutre,
                            @Param(value = "advertInfo")String advertInfo,
                            @Param(value = "adlocation")String adlocation,
                            @Param(value = "addTime")String addTime);

    //删除广告
    int deleteAdvertisement(long id);

    //增加广告
    int addAdvertisement(@Param(value = "adid")long adid,
                         @Param(value = "advertPicutre")String advertPicutre,
                         @Param(value = "advertInfo")String advertInfo,
                         @Param(value = "adlocation")String adlocation,
                         @Param(value = "addTime")String addTime);


}
